<template>
    <a-modal v-model="visible" @ok="handleOk" @cancel="handleOk" :width="1200" class="full-modal">
      <div class="modal-title">
        <div class="title-left">PSD设备实时视图</div>
        <div class="title-right">
          <span>所属站台：{{result.lineName}}/{{result.platformName}}</span>
          <span>所属位置：{{result.deviceLocation}}</span>
          <span>设备名称：{{result.deviceCode}}</span>
          <span>所属类别：{{result.deviceCategory}}</span>
        </div>
      </div>
          <!-- <div>开门值：{{this.doorOpening}}</div> -->
      <div class="top-cont" v-if="partsVOList.length">
        <div v-if='LCB'>
          <span class="deviceType" @click="toPartsDetail(LCB)">LCB</span>
          <ul>
            <li v-for="(e,i) in LCB.instructionsList" :key="i">
              <i :class="e.status == 1?'green':''"></i>
              {{e.instructionsName}}
            </li>
          </ul>
          <!-- <div class="connecting-line"></div>
          <div class="vertical-line"></div>
          <div class="transverse-line"></div>
          <div :class="['spot' ,LCB.healthyStatus!=='健康'?'orange':'']"></div> -->
        </div>
        <div v-if='aDZS'>
          <span class="deviceType" @click="toPartsDetail(aDZS)">A门电子锁</span>
          <ul>
            <li v-for="(e,i) in aDZS.instructionsList" :key="i">
              <i :class="e.status == 1?'green':''"></i>
              {{e.instructionsName}}
            </li>
          </ul>
          <!-- <div class="connecting-line"></div> -->
          <!-- <div class="vertical-line"></div> -->
          <div class="transverse-line"></div>
          <div :class="['spot' ,aDZS.healthyStatus!=='健康'?'orange':'']"></div>
        </div>        
  
          

        <div v-if='aMT'>
          <span class="deviceType" @click="toPartsDetail(aMT)">A门</span>
          <div class="menti">
            <ul>
              <li  v-for="(e,i) in (aMT.instructionsList).filter((e,i)=>i<5)" :key="i">
                  <i :class="e.status == 1?'green':''"></i>
                  {{e.instructionsName}}
              </li>
            </ul>
            <ul>
              <li v-for="(e,i) in (aMT.instructionsList).filter((e,i)=>i>4)" :key="i">
                    <i :class="e.status == 1?'green':''"></i>
                    {{e.instructionsName}}
              </li>    
            </ul>
            <div class="connecting-line"></div>
            <div class="vertical-line"></div>
          <div :class="['spot' ,aMT.healthyStatus!=='健康'?'orange':'']"></div>
          </div>

        </div> 
        <div v-if='hdm'>
          <span class="deviceType" @click="toPartsDetail(hdm)">滑动门</span>
          <div class="menti">
            <ul>
              <li  v-for="(e,i) in (hdm.instructionsList).filter((e,i)=>i<4)" :key="i">
                  <i :class="e.status == 1?'green':''"></i>
                  {{e.instructionsName}}
              </li>
            </ul>
            <ul>
              <li v-for="(e,i) in (hdm.instructionsList).filter((e,i)=>i>3)" :key="i">
                    <i :class="e.status == 1?'green':''"></i>
                    {{e.instructionsName}}
              </li>    
            </ul>
            <div class="connecting-line"></div>
            <div class="vertical-line"></div>
          <div :class="['spot' ,hdm.healthyStatus!=='健康'?'orange':'']"></div>
          </div>

        </div> 
        <div v-if='bMT'>
          <span class="deviceType" @click="toPartsDetail(bMT)">B门</span>
          <div class="menti">
            <ul>
              <li  v-for="(e,i) in (bMT.instructionsList).filter((e,i)=>i<4)" :key="i">
                  <i :class="e.status == 1?'green':''"></i>
                  {{e.instructionsName}}
              </li>
            </ul>
            <ul>
              <li v-for="(e,i) in (bMT.instructionsList).filter((e,i)=>i>3)" :key="i">
                    <i :class="e.status == 1?'green':''"></i>
                    {{e.instructionsName}}
              </li>    
            </ul>
            <div class="connecting-line"></div>
            <div class="vertical-line"></div>
          <div :class="['spot' ,bMT.healthyStatus!=='健康'?'orange':'']"></div>
          </div>

        </div>           
        <div v-if='bDZS'>
          <span class="deviceType" @click="toPartsDetail(bDZS)">B门电子锁</span>
          <ul>
            <li v-for="(e,i) in bDZS.instructionsList" :key="i">
              <i :class="e.status == 1?'green':''"></i>
              {{e.instructionsName}}
            </li>
          </ul>
          <div class="connecting-line"></div>
          <div :class="['spot' ,bDZS.healthyStatus!=='健康'?'orange':'']"></div>
        </div>             
        <div class="bus">
          <!-- <span class="bgRed"></span>
          <p class="colorRed">CAN总线正常</p> -->
          <!-- <span class="bgGreen"></span>
          <p class="bgGreen">CAN总线正常</p> -->

          <span :class="result.deviceStatus =='正常'?'bgGreen':'bgRed'"></span>
          <p :class="result.deviceStatus =='正常'?'colorGreen':'colorRed'">{{result.deviceStatus=='正常'?'CAN总线正常':'CAN总线故障'}}</p>

          <span :class="result.netStatus =='正常'?'bgGreen':'bgRed'"></span>
          <p :class="result.netStatus =='正常'?'colorGreen':'colorRed'">{{result.netStatus =='正常'?'485总线正常':'485总线故障'}}</p>
        </div>
      </div>
      <!-- <img src="../../../assets/half.png" alt=""> -->
      <div class="imgWarp">
        <div class="left">
          <img src="@/assets/half1.png" alt="">
          <img :style="{'right':`${doorOpening}%`}" src="@/assets/half2.png" alt="">
        </div>
        <div class="right">
          <img :style="{'left':`${doorOpening}%`}" src="@/assets/half3.png" alt="">
          <img src="@/assets/half4.png" alt="">
        </div>
      </div> 
      <div class="bottom-cont" v-if="partsVOList.length">
        <div :style="{'visibility':!zYJM?'hidden':''}"  class="bot-item">
          <span class="deviceType" @click="toPartsDetail(zYJM)">应急门</span>
          <ul v-if='zYJM'>
            <li v-for="(e,i) in zYJM.instructionsList" :key="i">
              <i :class="e.status == 1?'green':''"></i>
              {{e.instructionsName}}
            </li>
          </ul>
        </div>
        <div class="bot-item"  v-if='HW'>
          <span class="deviceType" @click="toPartsDetail(HW)">红外</span>
          <ul>
            <li v-for="(e,i) in HW.instructionsList" :key="i">
              <i :class="e.status == 1?'green':''"></i>
              {{e.instructionsName}}
            </li>
          </ul>
          <div class="connecting-line"></div>
          <div class="vertical-line"></div>
          <div class="transverse-line"></div>

          <div class="transverse-line"></div>
          <div :class="['spot' ,HW.healthyStatus!=='健康'?'orange':'']"></div>

        </div>
        <div  v-if='aMWCGQ' class="bot-item sensor">
          <span class="deviceType" @click="toPartsDetail(aMWCGQ)">A门位置传感器</span>
          <div>
            <ul>
              <li v-for="(e,i) in aMWCGQ.instructionsList" :key="i">
                <i :class="e.status == 1?'green':''"></i>
                {{e.instructionsName}}
              </li>
            </ul>
            <div class="connecting-line"></div>
            <div class="vertical-line"></div>
            <div class="transverse-line"></div>
          <div :class="['spot' ,aMWCGQ.healthyStatus!=='健康'?'orange':'']"></div>
          </div>

        </div>
        <div v-if='aDJ' class="bot-item sensor">
          <span class="deviceType" @click="toPartsDetail(aDJ)">A门电机</span>
          <div>
            <ul>
              <li v-for="(e,i) in aDJ.instructionsList" :key="i">
                <i :class="e.status == 1?'green':''"></i>
                {{e.instructionsName}}
              </li>
            </ul>
            <div class="connecting-line"></div>
            <div class="vertical-line"></div>

            <div class="transverse-line"></div>
          <div :class="['spot' ,aDJ.healthyStatus!=='健康'?'orange':'']"></div>
          </div>

        </div>
        <div  v-if='bDJ' class="bot-item sensor">
          <span class="deviceType" @click="toPartsDetail(bDJ)">B门电机</span>
          <div>
            <ul>
              <li v-for="(e,i) in bDJ.instructionsList" :key="i">
                <i :class="e.status == 1?'green':''"></i>
                {{e.instructionsName}}
              </li>
            </ul>
            <div class="connecting-line"></div>
            <div class="vertical-line"></div>
            <div class="transverse-line"></div>            
          <div :class="['spot' ,bDJ.healthyStatus!=='健康'?'orange':'']"></div>
          </div>

        </div>
        <div  v-if='bMWCGQ'  class="bot-item sensor">
          <span class="deviceType" @click="toPartsDetail(bMWCGQ)">B门位置传感器</span>
          <div>
            <ul>
              <li v-for="(e,i) in bMWCGQ.instructionsList" :key="i">
                <i :class="e.status == 1?'green':''"></i>
                {{e.instructionsName}}
              </li>
            </ul>
            <div class="connecting-line"></div>
            <div class="vertical-line"></div>
            <div class="transverse-line"></div>

          <div :class="['spot' ,bMWCGQ.healthyStatus!=='健康'?'orange':'']"></div>
          </div>

        </div>
        <div style="visibility: hidden;"  v-if='HW' class="bot-item">
          <span class="deviceType" @click="toPartsDetail(HW)">红外</span>
          <ul>
            <li v-for="(e,i) in HW.instructionsList" :key="i">
              <i :class="e.status == 1?'green':''"></i>
              {{e.instructionsName}}
            </li>
          </ul>
          <div class="connecting-line"></div>
          <div class="vertical-line"></div>

          <div class="transverse-line"></div>
          <div :class="['spot' ,HW.healthyStatus!=='健康'?'orange':'']"></div>

        </div>        
        <div  v-if='yYJM' class="bot-item">
          <span class="deviceType" @click="toPartsDetail(yYJM)">应急门</span>
          <div>
            <ul>
              <li v-for="(e,i) in yYJM.instructionsList" :key="i">
                <i :class="e.status == 1?'green':''"></i>
                {{e.instructionsName}}
              </li>
            </ul>
          </div>
        </div>
      </div>

      <p class="moreBtn" v-if="!showMore">
        <a @click='handleShowMore'>查看更多</a>
      </p>
      <div v-if="showMore" class="moreWarp">
        <div class="topContent">
          <div class="leftWarp">
            <div class="moreItem" v-for='(e,i) in leftData' :key="i">
              <div class="typeTitle">{{e.name}}</div>
              <div class="tContent">
                <div class="rowItem" v-for='(v,j) in e.details' :key="j">
                  <div class="statusWarp">
                    <span style='display:flex'>
                      <div class="title">{{v.title}}</div>
                      <div class="value">{{v.value}}</div>
                    </span>

                    <div class="unit">{{v.unit}}</div>
                  </div>
                  <div class="tip">{{v.tip}}</div>
                </div>
              </div>
            </div>
          </div>
          <div class="rightWarp">

            <div class="moreItem" v-for='(e,i) in rightData' :key="i">
              <div class="typeTitle">{{e.name}}</div>
              <div class="rowItem" v-for='(v,j) in e.details' :key="j">
                <div class="statusWarp">
                  <span style='display:flex'>
                    <div class="title">{{v.title}}</div>
                    <div class="value">{{v.value===''?'--':v.value}}</div>
                  </span>
                  <div class="unit">{{v.unit}}</div>
                </div>
                <div  class="tip">{{v.tip}}</div>
              </div>
            </div>
          </div>
        </div>

        <div class="bottomWarp">
          <div class="moreItem" v-for='(e,i) in bottomData' :key="i">
            <div class="typeTitle">{{e.name}}</div>
              <div class="botContent">
                <div class="rowItem" v-for='v in (e.details).filter((k,i)=>i<3)' :key="v.title">
                  <div class="statusWarp">
                    <span style='display:flex'>
                      <div class="title">{{v.title}}</div>
                      <div class="value">{{v.value}}</div>
                    </span>

                    <div class="unit">{{v.unit}}</div>
                  </div>
                  <div class="tip">{{v.tip}}</div>
                </div>
                <div style='width:270px' v-for="i in 1" :key="i"></div>
                <div class="rowItem" v-for='v in (e.details).filter((k,i)=>i>=3)' :key="v.title">
                  <div class="statusWarp">
                    <span style='display:flex'>
                      <div class="title">{{v.title}}</div>
                      <div class="value">{{v.value}}</div>
                    </span>

                    <div class="unit">{{v.unit}}</div>
                  </div>
                  <div class="tip">{{v.tip}}</div>
                </div>                
              </div>
          </div>
        </div>

      </div>

    </a-modal>
</template>
<script>
  import { getAction } from '@/api/manage'
  export default {
    data () {
      return {
        visible: false,
        partsVOList:[],
        result:{},
        timers:null,
        aDZS:null,
        bDZS:null,
        LCB:null,
        aMT:null,
        bMT:null,
        hdm:null,
        zYJM:null,
        yYJM:null,
        HW:null,
        aMWCGQ:null,
        bMWCGQ:null,
        aDJ:null,
        bDJ:null,
        showMore: false,
        leftData: null,
        rightData: null,
        bottomData: null,
        doorOpening:0
      };
    },
    props:['halfId'],
    watch:{
      halfId(val){
        if(val) {
          console.log('所有部件==>半高ID',val)
          this.getInfo(val)
          this.timers = setInterval(()=>{
            setTimeout(() => {
              this.getInfo(val)
            }, 0);
          },300)          
        }
      }
    },
    mounted(){

      // 模拟数据
    // let doorOpening=0
    // let myTimer =  setInterval(()=>{
    //      doorOpening+=Math.random()*10*2
    //       if(doorOpening<=0){
    //         doorOpening = 0
    //         clearInterval(myTimer)

    //       }else if(doorOpening>100){
    //         doorOpening = 0
    //       }
    //       this.doorOpening = doorOpening /2
    //   },300)

    },
    methods: {
      getInfo(id){
        getAction('/statistics/queryDataBoardDCU',{id}).then(res=>{
          if(res&&res.code==200){
            this.result = res.result
            // 开 --- 关
            //    0 --- 100.00
            let doorOpening = res.result.doorOpening || 0
            if(doorOpening<=0){
              doorOpening = 0
            }else if(doorOpening>100){
              doorOpening = 100
            }  
            this.doorOpening = doorOpening / 2
            

            this.partsVOList = res.result.partsVOList
            // console.log(this.partsVOList)

            let psdParamVOList = res.result.psdParamVOList
            // console.log('this.psdParamVOList>>>>', psdParamVOList)
            this.leftData = psdParamVOList.filter((e, i) => i == 0)
            this.rightData = psdParamVOList.filter((e, i) => i > 0 && i<(psdParamVOList.length-1))
            this.bottomData = psdParamVOList.filter(e => e.name=='电机诊断数据')
            console.log('this.bottomData>>>>', this.bottomData)

            this.aDZS = this.partsVOList.filter(item=>item.partsName == 'A门电子锁')[0]
            this.bDZS = this.partsVOList.filter(item=>item.partsName == 'B门电子锁')[0]
            this.LCB = this.partsVOList.filter(item=>item.partsName == 'LCB')[0]
            this.aMT = this.partsVOList.filter(item=>item.partsName == 'A门')[0]
            this.bMT = this.partsVOList.filter(item=>item.partsName == 'B门')[0]
            this.hdm = this.partsVOList.filter(item=>item.partsName == '滑动门')[0]

            // this.zYJM = this.partsVOList.filter(item=>item.partsName == '左应急门')[0]
            // this.yYJM = this.partsVOList.filter(item=>item.partsName == '右应急门')[0]
            let zM = this.partsVOList.filter(item=>item.partsName == '左应急门')[0]
            let yM = this.partsVOList.filter(item=>item.partsName == '右应急门')[0]

            this.zYJM = zM
            this.yYJM = yM   
            if(zM&&zM.reverse==1){
              this.zYJM = yM
              this.yYJM = zM
            }
            if(yM&&yM.reverse==1){
              this.zYJM = yM
              this.yYJM = zM
            }



            this.HW = this.partsVOList.filter(item=>item.partsName == '红外')[0]
            this.aMWCGQ = this.partsVOList.filter(item=>item.partsName == 'A门位置传感器')[0]
            this.bMWCGQ = this.partsVOList.filter(item=>item.partsName == 'B门位置传感器')[0]
            this.aDJ = this.partsVOList.filter(item=>item.partsName == 'A门电机')[0]
            this.bDJ = this.partsVOList.filter(item=>item.partsName == 'B门电机')[0]
          }
        })
      },
      handleOk () {
        clearInterval(this.timers)   
        this.timers = null          
        this.$emit('clearId')
        this.showMore = false
        this.visible = false;
      },
      toPartsDetail(data){
        // console.log('PSD部件详情id==》》',data) 
        if(data.partsName=='滑动门') return
        clearInterval(this.timers)   
        this.timers = null          
        this.$router.push({path:'/equipment/equipmentList/dcuDetail',query:{id:data.partsId,fName:this.result.deviceCode,type:data.partsName,isHome:true}})
      },
      handleShowMore() {
        this.showMore = true
      },      
    },
  };
</script>
<style lang="less" scoped>
  /deep/.ant-modal{
    top:30px !important;
  }
  .modal-title {
    padding-bottom: 24px;
    border-bottom: 1px solid #E9E9E9;
    display: flex;

    .title-left {
      font-size: 16px;
      font-weight: 500;
      color: #000;
      margin-right: 20px;
    }

    .title-right {
      line-height: 24px;
      font-size: 14px;
      color: rgba(0, 0, 0, .4);

      span {
        display: inline-block;
        margin-right: 50px;
      }
    }
  }

  .top-cont,
  .bottom-cont {
    display: flex;
    margin-top: 10px;
    margin-bottom: 20px;
    justify-content: space-between;
    >div {

      .transverse-line,.vertical-line,.connecting-line,.spot{
        z-index: 3;
      }

      border: 1px solid #E9E9E9;
      // padding: 5px 20px;
      border-radius: 2px;
      position: relative;
      // margin-right: 20px;

      .connecting-line {
        width: 0;
        border-left: 2px dashed #1890FF;
        height: 30px;
        position: absolute;
        left: 50%;
        bottom: -30px;
      }

      .spot {
        width: 24px;
        height: 24px;
        position: absolute;
        border-radius: 50%;
        background-color: rgba(24, 144, 255, 0.3);
        border: 2px solid #1890FF;
        left: 39%;
        bottom: -52px;

        &.orange {
          background: #F5A623;
          box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
          border: 2px solid #FFFFFF;
        }
      }

      .menti {
        display: flex;

        .connecting-line {
          // left: 30%;
          bottom: -30px;
        }

        .spot {

          background-color: rgba(24, 144, 255, 0.3);
          border: 2px solid #1890FF;
          left: 25.8%;
          bottom: -52px;
        }

        ul:first-child {
          // margin-right: 10px;
        }
      }


      span {
        font-size: 14px;
        color: #000;
        font-weight: 500;
        // margin-bottom: 20px;
        display: block;
      }

      ul {
        margin: 0;
        padding: 10px 20px 0 10px;
        li {
          list-style: none;
          margin-bottom: 8px;

          i {
            width: 8px;
            height: 8px;
            display: inline-block;
            border-radius: 50%;
            background: #DCDCDC;

            &.warning {
              background-color: #FF3823;
            }
          }
        }
      }
    }
    .green {
      background: #52c41a;
    }
    .bus {
      padding: 26px 6px;
      text-align: center;
      color: #7BCD0F;

      span {
        display: block;
        width: 24px;
        height: 24px;
        margin: 0 auto;
        // background: #7BCD0F;
        border-radius: 50%;
        margin-bottom: 6px;



        &.healthy {
          background: #7BCD0F;
        }
        &.warning {
          background: #F5A623;
        }
        &:nth-child(2) {
          margin-top: 50px;
        }
      }
      .bgRed {
          background: #FF3823;
        }      
      .bgGreen {
        background: #7BCD0F;
      }
      .colorGreen{
        color: #7BCD0F;
      }
      .colorRed {
        color: #FF3823;
      }
    }
  }

  .top-cont {
    >div {
      &:nth-child(1) {
        .connecting-line {
          height: 33px;
          bottom: -33px;
          // left: 200px;
        }
        .vertical-line {
          position: absolute;
          width: 170px;
          top: 220px;
          left: 70px;
          // transform: rotate(29deg);
          border-top: 2px dashed #1890FF;
        }
        .transverse-line {
          position: absolute;
          height: 142px;
          border-left: 2px dashed #1890FF;
          // width: 80px;
          top: 220px;
          left: 240px;
        }         
        .spot {
          bottom: -200px;
          left: 230px;
          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }       
      &:nth-child(2) {
        .connecting-line {
          height: 15px;
          bottom: -15px;
        }
        .vertical-line {
          position: absolute;
          width: 92px;
          top: 200px;
          left: 50px;
          border-top: 2px dashed #1890FF;
        }
        .transverse-line {
          position: absolute;
          height: 178px;
          border-left: 2px dashed #1890FF;
          top: 189px;
          left: 116px;
        }        
        .spot {
          bottom: -204px;
          left: 105px;

          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }       
      &:nth-child(3) {
        .connecting-line {
          height: 15px;
          bottom: -15px;
          // left: 80px;
        }

        .spot {
          bottom: -37px;
          left: 60px;
          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }       
      &:nth-child(4) {
        .connecting-line {
          height: 15px;
          bottom: -15px;
          left: 124px;

        }

        .spot {
          bottom: -37px;
          left: 113px;
          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }      
      &:nth-child(5) {
        .connecting-line {
          height: 15px;
          bottom: -15px;
        }
        .spot {
          left: 60px;
          bottom: -37px;
          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }
      &:nth-child(6) {
        .connecting-line {
          height: 180px;
          bottom: -180px;
          left: 22px;

        }
        .spot {
          bottom: -204px;
          left: 11px;

          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }      
    }}
  .bottom-cont {
    >div {
      .connecting-line {
        height: 110px;
        // left: 44%;
        top: -110px;
      }

      .spot {
        left: 38%;
        top: -135px;

        &.orange {
          background: #F5A623;
          box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
          border: 2px solid #FFFFFF;
        }
      }

      &:first-child {
        // margin-left: 10px;
        // margin-right: 20px;
      }
      &:nth-child(2) {
        .connecting-line {
          height: 20px;
          // left: 95px;
          top: -20px;
        }

        .vertical-line {
          position: absolute;
          width: 106px;
          // height: 20px;
          top: -20px;
          left: -50px;
          border-top: 2px dashed #1890FF;
        }

        .transverse-line {
          position: absolute;
          height: 101px;
          border-left: 2px dashed #1890FF;
          // width: 80px;
          top: -121px;
          left: -50px;
        }

        .spot {
          left: -60px;
          top: -145px;

          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }
      &:nth-child(3) {
        .connecting-line {
          height: 30px;
          // left: 95px;
          top: -30px;
        }

        .vertical-line {
          position: absolute;
          width: 0;
          height: 50px;
          top: -80px;
          left: -82px;
          border-left: 2px dashed #1890FF;
        }

        .transverse-line {
          position: absolute;
          height: 0;
          border-top: 2px dashed #1890FF;
          width: 154px;
          top: -30px;
          left: -82px;
        }

        .spot {
          left: -92px;
          top: -105px;

          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }

      &:nth-child(4) {
        .connecting-line {
          height: 40px;
          // left: 10px;
          top: -40px;
        }

        .vertical-line {
          position: absolute;

          height: 20px;
          top: -59px;
          left: -215px;
          border-left: 2px dashed #1890FF;
        }

        .transverse-line {
          position: absolute;
          height: 0;
          border-top: 2px dashed #1890FF;
          width: 264px;
          top: -40px;
          left: -215px;
        }

        .spot {
          left: -225px;
          top: -85px;

          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }

      &:nth-child(5) {
        // margin-right: 180px;

        .connecting-line {
          height: 40px;
          // left: -240px;
          top: -40px;
        }

        .vertical-line {
          position: absolute;
          width: 0;

          height: 22px;
          top: -62px;
          left: 311px;
          border-left: 2px dashed #1890FF;
        }

        .transverse-line {
          position: absolute;
          height: 0;
          border-top: 2px dashed #1890FF;
          width: 263px;
          top: -40px;
          left: 50px;
        }

        .spot {
          left: 300px;
          top: -85px;

          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }
      &:nth-child(6) {
        // margin-left: 20px;
        .connecting-line {
          height: 30px;
          // left: 25px;
          top: -30px;
        }
        .vertical-line {
          position: absolute;
          width: 0;

          height: 52px;
          top: -82px;
          left: 218px;
          border-left: 2px dashed #1890FF;
        }

        .transverse-line {
          position: absolute;
          height: 0;
          border-top: 2px dashed #1890FF;
          width: 148px;
          top: -30px;
          left: 72px;
        }
        .spot {
          left: 208px;
          top: -105px;

          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }
      &:nth-child(7) {
        .connecting-line {
          height: 20px;
          top: -20px;
        }
        .vertical-line {
          position: absolute;
          width: 0;

          height: 100px;
          top: -120px;
          left: 130px;
          border-left: 2px dashed #1890FF;
        }

        .transverse-line {
          position: absolute;
          height: 0;
          border-top: 2px dashed #1890FF;
          width: 90px;
          top: -20px;
          left: 42px;
        }
        .spot {
          top: -143px;
          left: 120px;

          &.orange {
            background: #F5A623;
            box-shadow: 0px 2px 8px 1px rgba(245, 166, 35, 0.65);
            border: 2px solid #FFFFFF;
          }
        }
      }      
    }
  }

  img {
    width: 100%;
    height: 300px;
  }
  .deviceType{
    background: #FAFAFA;
    text-align: center;
    line-height: 32px;
  }  
.moreBtn {
  text-align: center;
  margin: 20px 0 0;
  font-size: 18px;
  user-select: none;
}

.moreWarp {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  // border: 1px solid red;
  .topContent{
    display: flex;
    justify-content: space-between;
  // border: 1px solid red;

  }
  .moreItem {
    border: 1px solid #e9e9e9;
    margin-bottom: 10px;
  }
  .typeTitle {
    background: #fafafa;
    padding: 0 15px 0 10px;
    line-height: 32px;
    text-align: center;
  }
  .rowItem {
    width: 270px;
    // border: 1px saddlebrown solid;
    padding: 5px 10px 5px 10px;
    .statusWarp {
      display: flex;
      justify-content: space-between;
      .title {
        width: 150px;
        // border: 1px solid red;
        // text-align: justify;
        // text-align-last:justify;
        // text-justify: distribute-all-lines;
      }
      .value {
        width: 60px;
        // border: 1px solid #52c41a;
        text-align: left;
        color: #52c41a;
      }
      .unit {
      }
    }
    .tip {
      font-size: 14px;
      color: #cac6ca;
    }
  }
}
.tContent {
  // border:1px solid red;
  display: flex;
  flex-direction: column;
  height: 430px;
  flex-wrap: wrap;
  // .rowItem {
  //   margin: 0 10px;
  // }
}
.leftWarp {
  // margin-right:10px ;
  width: 49%;
}
.rightWarp {
  width: 49%;
  // border: 1px solid red;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}  
.bottomWarp {
  width: 100%;
  .botContent {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    .rowItem {
      // width: 220px;
      // border: 1px saddlebrown solid;
      padding: 5px 10px 5px 10px;
      .statusWarp {
        display: flex;
        justify-content: space-between;
        .title {
          width: 150px;
          // border: 1px solid red;
        }
        .value {
          width: 130px;
          // border: 1px solid #52c41a;
          text-align: left;
          color: #52c41a;
        }
        .unit {
        }
      }
      .tip {
        font-size: 14px;
        color: #cac6ca;
      }
    } 
  }

} 
.imgWarp{
  height:300px;
  width:100%;
  display: flex;
  align-items: center;
    overflow: hidden;
  div{
    width:50%;
    display: flex;
    align-items: center;
    position: relative;
    img{
      position: absolute;
      transition: all ease .7s
    }

  }
  

  .left{
    img:nth-child(1){
      z-index: 1;
      width:57%;
      left:0;

    }
    img:nth-child(2){
      width:45%;
      right:0;
    }
  }

  .right{
    img:nth-child(1){
    width:45%;
    left:0;

    }
    img:nth-child(2){
      z-index: 1;
      width:57%;
      right:0;

    }
  }

}
</style>